<?php
/**
  * @author zhenc
  * @time
  * @param  拦截器、插件添加https://www.mageplaza.com/magento-2-module-development/magento-2-plugin-interceptor.html
  * @return
*/

namespace Mageplaza\HelloWorld\Controller\Index;

class Example extends \Magento\Framework\App\Action\Action
{

    protected $title;

    public function execute()
    {
        //$this->setTitle('Welcome');
       // echo $this->getTitle();

       //echo $this->Test();
       echo $this->Name('zhenc');
    }

    public function setTitle($title)
    {
        return $this->title = $title;
    }

    public function getTitle()
    {
        return $this->title;
    }
    public function Test()
    {
        return "222";
    }
    public function  Name($name)
    {
        return $name;
    }
}
